package com.campus.commons.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author Rin
 * @since 2020-12-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Departments对象", description="部门表")
public class Departments implements Serializable {
    public static Map<Integer, Departments> departmentsMap = new HashMap<>();
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "部门id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "部门名称")
    @TableField("deName")
    private String dename;

    @ApiModelProperty(value = "部门简介")
    @TableField("deInfo")
    private String deinfo;

    @ApiModelProperty(value = "负责老师")
    @TableField("teacherId")
    private Integer teacherid;
    @TableField(exist = false)
    private String teacherName;

    public void setTeacherid(Integer teacherid) {
        this.teacherid = teacherid;
//        this.teacherName = Teacher.teachers.get(teacherid).getTeachername();
    }
}
